<template>
  <a-spin :spinning="confirmLoading">
    <j-form-container>
      <!-- 主表单区域 -->
      <a-form :form="form" slot="detail">
        <a-row>
          <a-col :span="12">
            <a-form-item label="公司名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <!--              <a-select v-decorator="['companyName', validatorRules.companyName]" placeholder="请选择公司名称">-->
              <!--                &lt;!&ndash;                <div slot="dropdownRender" slot-scope="menu">&ndash;&gt;-->
              <!--                &lt;!&ndash;                  <v-nodes :vnodes="menu" />&ndash;&gt;-->
              <!--                &lt;!&ndash;                  <a-divider style="margin: 4px 0;" />&ndash;&gt;-->
              <!--                &lt;!&ndash;                  <div&ndash;&gt;-->
              <!--                &lt;!&ndash;                    style="padding: 4px 8px; cursor: pointer;"&ndash;&gt;-->
              <!--                &lt;!&ndash;                    @mousedown="e => e.preventDefault()"&ndash;&gt;-->
              <!--                &lt;!&ndash;                    @click="addItem"&ndash;&gt;-->
              <!--                &lt;!&ndash;                  >&ndash;&gt;-->
              <!--                &lt;!&ndash;                    <a-icon type="plus-circle" />&ndash;&gt;-->
              <!--                &lt;!&ndash;                    添加新客户&ndash;&gt;-->
              <!--                &lt;!&ndash;                  </div>&ndash;&gt;-->
              <!--                &lt;!&ndash;                </div>&ndash;&gt;-->
              <!--                <a-select-option v-for="(item, key) in dictOptions" :key="key" :value="item.value">-->
              <!--                  {{ item.text }}-->
              <!--                </a-select-option>-->
              <!--              </a-select>-->
              <a-select v-decorator="['companyName', validatorRules.companyName]" allowClear showSearch
                        placeholder="请选择公司名称">
                <a-select-option v-for="(item, key) in companyData" :key="key" :value="item.value">
                  {{ item.text }}
                </a-select-option>
              </a-select>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="箱东代码" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-auto-complete allowClear v-decorator="['containerCode']" placeholder="箱东代码"
                               :dataSource="socOptions" :filterOption="containerCodeFilterOption" />
              <!--              <j-popup-->
              <!--                v-decorator="['containerCode']"-->
              <!--                :trigger-change="true"-->
              <!--                org-fields="id,container_code,container_number,container_type"-->
              <!--                dest-fields="boxId,containerCode,containerNumber,containerType"-->
              <!--                code="jzx_info"-->
              <!--                @callback="popupCallback" />-->
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="箱号" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="['containerNumber']"
                       placeholder="箱号"></a-input>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="箱型" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <!--              <a-input v-decorator="['containerType']"-->
              <!--                       placeholder="箱型"></a-input>-->
              <j-dict-select-tag v-decorator="['containerType']" placeholder="箱型"
                                 dictCode="box_type" :triggerChange="true" />
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="新箱/旧箱" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <j-dict-select-tag type="radio" v-decorator="['conditionType']" :trigger-change="true"
                                 dictCode="box_condition" placeholder="请选择新箱/旧箱" />
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="客户业务编号" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input v-decorator="['customerBusinessNumber']" placeholder="请输入客户业务编号"></a-input>
            </a-form-item>
          </a-col>
          <template>
            <a-col :span="12">
              <a-form-item label="买箱费" :labelCol="labelCol" :wrapperCol="wrapperCol">
                <a-row>
                  <a-col :span="18">
                    <a-input-number placeholder="请输入" v-decorator="['buyBoxCost']"
                                    @blur="calcProfit"
                                    style="width: 100%" />
                  </a-col>
                  <a-col :span="6">
                    <j-dict-select-tag @change="buyBoxSelectCurrency" v-decorator="['buyBoxCostCurrency']"
                                       :trigger-change="true"
                                       dictCode="currency" placeholder="币种" />
                  </a-col>
                </a-row>
              </a-form-item>
            </a-col>
            <a-col :span="12">
              <a-form-item label="卖箱费" :labelCol="labelCol" :wrapperCol="wrapperCol">
                <a-row>
                  <a-col :span="18">
                    <a-input-number placeholder="请输入" v-decorator="['saleBoxCost']"
                                    @blur="calcProfit"
                                    style="width: 100%" />
                  </a-col>
                  <a-col :span="6">
                    <j-dict-select-tag @change="saleBoxSelectCurrency" v-decorator="['saleBoxCostCurrency']"
                                       :trigger-change="true"
                                       dictCode="currency" placeholder="币种" />
                  </a-col>
                </a-row>
              </a-form-item>
            </a-col>
            <!--            <a-col :span="12">-->
            <!--              <a-form-item label="意向卖箱费" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
            <!--                <a-input-number v-decorator="['intentionToSellBoxFeel']" placeholder=""-->
            <!--                                style="width: 100%" />-->
            <!--              </a-form-item>-->
            <!--            </a-col>-->
            <a-col :span="12">
              <a-form-item label="起运港进堆场时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
                <j-date placeholder="起运港进堆场时间" v-decorator="['polInTime']"
                        :trigger-change="true"
                        date-format="YYYY-MM-DD HH:mm:ss"
                        @change="polInTimeChangeHandle"
                        style="width: 100%" />
              </a-form-item>
            </a-col>
            <a-col :span="12">
              <a-form-item label="提箱日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
                <j-date placeholder="请选择提箱日期" v-decorator="['takeBoxTime']"
                        :trigger-change="true"
                        @change="takeBoxTimeChangeHandle"
                        style="width: 100%" />
              </a-form-item>
            </a-col>
            <a-col :span="12">
              <a-form-item label="利润额" :labelCol="labelCol" :wrapperCol="wrapperCol"
                           help="利润额=卖箱费-买箱费">
                <a-row>
                  <a-col :span="10">
                    <a-input disabled v-decorator="['profit']" placeholder="" :suffix="lirunbizhong"
                             style="width: 100%" :placeholder="profitTips" class="plclass" />
                  </a-col>
                  <a-col :span="8">
                    <a-input v-decorator="['profitDesc']" style="width: 100%" :suffix="lirunbizhong"
                             placeholder="请输入" />
                  </a-col>
                  <a-col :span="6">
                    <j-dict-select-tag v-decorator="['profitDescCurrency']" :trigger-change="true"
                                       dictCode="currency" placeholder="币种" />
                  </a-col>
                </a-row>
              </a-form-item>
            </a-col>
            <a-col :span="24" style="margin-left: -12.5%">
              <a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol">
                <a-textarea
                  v-decorator="['remark']"
                  placeholder="备注"
                  :auto-size="{ minRows: 3, maxRows: 5 }"
                />
              </a-form-item>
            </a-col>
            <!--            <a-col :span="12">-->
            <!--              <a-form-item label="超期堆存费" :labelCol="labelCol" :wrapperCol="wrapperCol"-->
            <!--                           help="超期堆存费=(提箱日期-进场时间-免费堆存天数)*堆存费">-->
            <!--                <a-input v-decorator="['overdueStorageFee']" placeholder=""-->
            <!--                         :disabled="true" :addon-before="duicunfeiCurrency" />-->
            <!--              </a-form-item>-->
            <!--            </a-col>-->
          </template>
        </a-row>
      </a-form>
    </j-form-container>
    <!--    <a-modal-->
    <!--      title="添加新客户"-->
    <!--      :visible="customerModalVisible"-->
    <!--      :maskClosable="false"-->
    <!--      :confirm-loading='confirmLoading'-->
    <!--      @ok="addHandleOk"-->
    <!--      @cancel="addHandleCancel"-->
    <!--    >-->
    <!--      <a-input placeholder="请输入新客户公司抬头" v-model="newCustomerTitle" :allowClear=true></a-input>-->
    <!--    </a-modal>-->
    <!-- 子表单区域 -->
    <!--    <a-tabs v-model="activeKey" type="card" @change="handleChangeTabs">-->

    <!--      <template>-->
    <!--        <a-tab-pane tab="应收明细" :key="refKeys[0]" :forceRender="true">-->
    <!--          <j-editable-table-->
    <!--            :ref="refKeys[0]"-->
    <!--            :loading="costInfoTableYs.loading"-->
    <!--            :columns="costInfoTableYs.columns"-->
    <!--            :dataSource="costInfoTableYs.dataSource"-->
    <!--            :disabledRows="disabledRowsYs"-->
    <!--            @cb="reloadChildTabData"-->
    <!--            :formModel="model"-->
    <!--            :createBillBtn="true"-->
    <!--            :maxHeight="300"-->
    <!--            :disabled="formDisabled"-->
    <!--            :rowNumber="true"-->
    <!--            :rowSelection="true"-->
    <!--            :actionButton="true" />-->
    <!--        </a-tab-pane>-->
    <!--        <a-tab-pane tab="应付明细" :key="refKeys[1]" :forceRender="true">-->
    <!--          <j-editable-table-->
    <!--            :ref="refKeys[1]"-->
    <!--            :loading="costInfoTableYf.loading"-->
    <!--            :columns="costInfoTableYf.columns"-->
    <!--            :dataSource="costInfoTableYf.dataSource"-->
    <!--            :disabledRows="disabledRowsYf"-->
    <!--            @cb="reloadChildTabData"-->
    <!--            :formModel="model"-->
    <!--            :createBillBtn="true"-->
    <!--            :maxHeight="300"-->
    <!--            :disabled="formDisabled"-->
    <!--            :rowNumber="true"-->
    <!--            :rowSelection="true"-->
    <!--            :actionButton="true" />-->
    <!--        </a-tab-pane>-->
    <!--      </template>-->
    <!--    </a-tabs>-->
  </a-spin>
</template>

<script>

import pick from 'lodash.pick'
import { getAction, httpAction } from '@/api/manage'
import { getRefPromise } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import JFormContainer from '@/components/jeecg/JFormContainer'
import JDate from '@/components/jeecg/JDate'
import JDictSelectTag from '@/components/dict/JDictSelectTag'
import { ajaxGetDictItems } from '@api/api'

export default {
  name: 'JzxTradeFormInside',
  mixins: [JEditableTableMixin],
  components: {
    JFormContainer,
    JDate,
    JDictSelectTag
    // VNodes: {
    //   functional: true,
    //   render: (h, ctx) => ctx.props.vnodes
    // }
  },
  data() {
    return {
      profitTips: '',
      lirunbizhong: '',
      socOptions: [],
      freeDepositDays: 0,
      customerModalVisible: false,
      confirmLoading: false,
      newCustomerTitle: '',
      labelCol: {
        xs: { span: 24 },
        sm: { span: 6 }
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 }
      },
      labelCol2: {
        xs: { span: 24 },
        sm: { span: 3 }
      },
      wrapperCol2: {
        xs: { span: 24 },
        sm: { span: 20 }
      },
      // 新增时子表默认添加几行空数据
      addDefaultRowNum: 0,
      validatorRules: {
        containerNumber: {
          rules: [
            { required: true, message: '请输入箱号!' }
          ]
        },
        companyName: {
          rules: [
            { required: true, message: '请选择公司名称!' }
          ]
        },
        containerType: {
          rules: [
            { required: true, message: '请选择集装箱信息!' }
          ]
        }
      },
      refKeys: [],
      url: {
        add: '/box.trade/jzxTrade/add',
        edit: '/box.trade/jzxTrade/edit',
        queryById: '/box.trade/jzxTrade/queryById',
        costInfoYs: {
          list: '/box.trade/jzxTrade/queryCostInfoByMainId'
        },
        costInfoYf: {
          list: '/box.trade/jzxTrade/queryCostInfoByMainId'
        }
      },
      // dictOptions: [],
      companyData: [],
      status: false,
      boxId: '',
      polInTime: '',
      takeBoxTime: '',
      duicunfei: 0,
      duicunfeiCurrency: ''
    }
  },
  props: {
    type: {
      type: String,
      required: true,
      default: '1'
    },

    //表单禁用
    disabled: {
      type: Boolean,
      default: false,
      required: false
    }
  },
  computed: {
    // formDisabled() {
    //   if (this.formBpm === true) {
    //     if (this.formData.disabled === false) {
    //       return false
    //     }
    //     return true
    //   }
    //   return this.disabled
    // },
    // showFlowSubmitButton() {
    //   if (this.formBpm === true) {
    //     if (this.formData.disabled === false) {
    //       return true
    //     }
    //   }
    //   return false
    // }

  },
  created() {
    //如果是流程中表单，则需要加载流程表单data
    this.showFlowData()
  },
  mounted() {
    this.initDictData()
  },
  methods: {
    // //选择箱型时按需计算
    // getBoxType(v) {
    //   console.log(v)
    // },

    save() {
      this.form.validateFields((err, values) => {
        if (!err) {
          let url = this.url.edit
          let method = 'put'
          let formData = values
          if (this.model.id) {
            values['id'] = this.model.id
          } else {
            url = this.url.add
            method = 'post'
            // values['boxId'] = this.boxId
            values['type'] = this.type
          }

          formData.profitCurrency = this.lirunbizhong
          this.confirmLoading = true
          httpAction(url, values, method).then((res) => {
            if (res.success) {
              this.$message.success(res.message)
              if (method == 'post') {
                this.model.id = res.result
              }
              this.$emit('ok', res.result)
              // this.close()
            } else {
              this.$message.warning(res.message)
            }
          }).finally(() => {
            this.confirmLoading = false
          })
        }
      })
    },
    initDictData() {
      let param = { isLock: 0, pageSize: 99999 }
      getAction('/companydata/list', param).then(res => {
        console.log(res.result.records)
        let companyDataList = []
        for (let i = 0; i < res.result.records.length; i++) {
          companyDataList.push({
            value: res.result.records[i].companyName,
            text: res.result.records[i].companyName
          })
        }
        this.companyData = companyDataList
      })
      ajaxGetDictItems('soc', null).then(res => {
        if (res.success) {
          res.result.forEach(item => {
            this.socOptions.push(item.value)
          })
        }
      })
    },
    //计算利润额
    calcProfit() {
      let buyBoxCost = this.form.getFieldValue('buyBoxCost')
      let saleBoxCost = this.form.getFieldValue('saleBoxCost')
      let buyBoxCostCurrency = this.form.getFieldValue('buyBoxCostCurrency')
      let saleBoxCostCurrency = this.form.getFieldValue('saleBoxCostCurrency')
      console.log(saleBoxCostCurrency)
      console.log(buyBoxCostCurrency)
      if (buyBoxCostCurrency != null && saleBoxCostCurrency != null && buyBoxCostCurrency == saleBoxCostCurrency) {
        if (typeof (buyBoxCost) == undefined || buyBoxCost == null) {
          buyBoxCost = 0
        }
        if (typeof (saleBoxCost) == undefined || saleBoxCost == null) {
          saleBoxCost = 0
        }
        let profit = parseFloat(saleBoxCost) - parseFloat(buyBoxCost)
        this.form.setFieldsValue({ 'profit': profit })
        this.lirunbizhong = buyBoxCostCurrency
        this.profitTips = ''

      } else {
        this.form.setFieldsValue({ 'profit': '' })
        this.lirunbizhong = ''
        this.profitTips = '各项费用币种不一致'
      }

    },
    takeBoxTimeChangeHandle: function(v) {
      this.takeBoxTime = v
      // this.calcOverdueStorageFee()
    },
    polInTimeChangeHandle: function(v) {
      this.polInTime = v
      // this.calcOverdueStorageFee()
    },
    // calcOverdueStorageFee() {
    //   let diffDays = this.DateDiff(this.takeBoxTime, this.polInTime)
    //   let a = diffDays - this.freeDepositDays
    //   if (a) {
    //     console.log(parseFloat(a * this.duicunfei))
    //     this.form.setFieldsValue({ 'overdueStorageFee': parseFloat(a * this.duicunfei).toFixed(2) })
    //   } else {
    //     this.form.setFieldsValue({ 'overdueStorageFee': 0 })
    //   }
    // },
    DateDiff(sDate1, sDate2) {    //sDate1和sDate2是2002-12-18格式
      let aDate, oDate1, oDate2, iDays
      aDate = sDate1.split('-')
      oDate1 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0])    //转换为12-18-2002格式
      aDate = sDate2.split('-')
      oDate2 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0])
      iDays = parseInt((oDate1 - oDate2) / 1000 / 60 / 60 / 24)    //把相差的毫秒数转换为天数
      return iDays
    },
    // addHandleCancel(e) {
    //   this.customerModalVisible = false
    //   this.newCustomerTitle = ''
    // },
    // addHandleOk(e) {
    //   let customerVal = this.newCustomerTitle.trim().replaceAll(' ', '')
    //   let url = '/box.common/add', method = 'post'
    //   let value = { 'customerTitle': customerVal }
    //   if (customerVal) {
    //     httpAction(url, value, method).then((res) => {
    //       if (res.success) {
    //         this.$message.success(res.message)
    //         this.customerModalVisible = false
    //         console.log(res.result)
    //         this.dictOptions.unshift({ 'value': res.result, 'text': customerVal, 'title': customerVal })
    //         this.form.setFieldsValue({ 'companyName': res.result })
    //       } else {
    //         this.$message.warning(res.message)
    //       }
    //     }).finally(() => {
    //       this.newCustomerTitle = ''
    //     })
    //   }
    // },
    // addItem() {
    //   this.customerModalVisible = true
    // },
    addBefore() {
      this.form.resetFields()
      // this.costInfoTableYs.dataSource = []
      // this.costInfoTableYf.dataSource = []
    },
    // getAllTable() {
    //   let values = this.tableKeys.map(key => getRefPromise(this, key))
    //   return Promise.all(values)
    // },
    /** 调用完edit()方法之后会自动调用此方法 */
    editAfter() {
      let fieldval = pick(this.model, 'conditionType', 'overdueStorageFee', 'profitCurrency', 'profitDesc', 'profitDescCurrency', 'remark', 'buyBoxCostCurrency', 'saleBoxCostCurrency', 'intentionToSellBoxFeel', 'customerBusinessNumber', 'takeBoxTime', 'boxId', 'companyName', 'containerCode', 'containerNumber', 'containerType', 'pol', 'pod', 'polInTime', 'eta', 'etd', 'podReturnboxTime', 'podLeaveTime', 'podYardInfo', 'podYardCostRate', 'buyBoxCost', 'useBoxCost', 'saleBoxCost', 'podYardTotalCost', 'profit', 'status', 'orderStartTime')
      this.$nextTick(() => {
        this.form.setFieldsValue(fieldval)
      })
      this.calcProfit()
      console.log(this.type)
      // 加载子表数据
      // if (this.model.id) {
      // let params = { id: this.model.id, type: 'ys' }
      // let params1 = { id: this.model.id, type: 'yf' }
      // this.requestSubTableDataOt(this.url.costInfoYs.list, params, this.costInfoTableYs)
      // this.requestSubTableDataOt(this.url.costInfoYf.list, params1, this.costInfoTableYf)
      // }
    },
    // reloadChildTabData(ids, billNumber, datas) {
    //   let ysListIds = []
    //   let yfListIds = []
    //   let billType = datas[0].billType
    //   if (billType == '应收') {
    //     datas.forEach((item, index) => {
    //       if (ids.indexOf(item.id) > -1) {
    //         ysListIds.push(item.id)
    //         item.status = '未开票未核销'
    //         item.billNumber = billNumber
    //       }
    //     })
    //     this.costInfoTableYs.dataSource = datas
    //     this.disabledRowsYs = { 'id': ysListIds }
    //   } else if (billType == '应付') {
    //     datas.forEach((item, index) => {
    //       if (ids.indexOf(item.id) > -1) {
    //         yfListIds.push(item.id)
    //         item.status = '未开票未核销'
    //         item.billNumber = billNumber
    //       }
    //     })
    //     this.costInfoTableYf.dataSource = datas
    //     this.disabledRowsYf = { 'id': yfListIds }
    //   }
    // },
    // /** 查询某个tab的数据 */
    // requestSubTableDataOt(url, params, tab, type, success) {
    //   tab.loading = true
    //   getAction(url, params).then(res => {
    //     let { result } = res
    //     let dataSource = []
    //     if (result) {
    //       if (Array.isArray(result)) {
    //         dataSource = result
    //       } else if (Array.isArray(result.records)) {
    //         dataSource = result.records
    //       }
    //     }
    //     tab.dataSource = dataSource
    //     // this.aaa()
    //     tab.loading = false
    //   }).finally(() => {
    //     tab.loading = false
    //   })
    // },
    // aaa() {
    //   let ysListIds = []
    //   let yfListIds = []
    //   this.costInfoTableYs.dataSource.forEach((data, index) => {
    //     if (data.status !== '账单未建立') {
    //       ysListIds.push(data.id)
    //     }
    //   })
    //   this.costInfoTableYf.dataSource.forEach((data, index) => {
    //     if (data.status !== '账单未建立') {
    //       yfListIds.push(data.id)
    //     }
    //   })
    //   this.disabledRowsYf = { 'id': yfListIds }
    //   this.disabledRowsYs = { 'id': ysListIds }
    // },
    /** 整理成formData */
    classifyIntoFormData(allValues) {
      // allValues.formValue['boxId'] = this.boxId
      allValues.formValue['type'] = this.type
      allValues.formValue['profitCurrency'] = this.lirunbizhong
      // allValues.formValue['overdueStorageCurrency'] = this.duicunfeiCurrency
      let main = Object.assign(this.model, allValues.formValue)
      return {
        ...main // 展开
        // costInfoListYs: allValues.tablesValue[0].values,
        // costInfoListYf: allValues.tablesValue[1].values
      }
      console.log(allValues)
      // if (this.status) {
      //   return {
      //     ...main, // 展开
      //     costInfoListYs: allValues.tablesValue[0].values,
      //     costInfoListYf: allValues.tablesValue[1].values
      //   }
      // } else {
      //   return {
      //     ...main, // 展开
      //     jzxDefaultCostDetailsList: allValues.tablesValue[0].values
      //   }
      // }

    },
    //渲染流程表单数据
    showFlowData() {
      if (this.formBpm === true) {
        let params = { id: this.formData.dataId }
        getAction(this.url.queryById, params).then((res) => {
          if (res.success) {
            this.edit(res.result)
          }
        })
      }
    },
    validateError(msg) {
      this.$message.error(msg)
    },
    containerCodeFilterOption(input, option) {
      return (
        option.componentOptions.children[0].text.toUpperCase() >= input.toUpperCase()
      )
    },
    //买
    buyBoxSelectCurrency(v) {
      this.form.setFieldsValue({ 'buyBoxCostCurrency': v })
      this.calcProfit()
    },
    //选择币种-卖
    saleBoxSelectCurrency(v) {
      this.form.setFieldsValue({ 'saleBoxCostCurrency': v })
      this.calcProfit()
    }

    // popupCallback(row) {
    //   this.boxId = row.boxId
    //   this.freeDepositDays = row.freeDepositDays == '' ? 0 : row.freeDepositDays
    //   console.log(row)
    //   let url = '/box.info/jzxInfo/querycostdetailbycostname'
    //   let params = {}
    //   params.id = row.boxId
    //   params.costName = 'DUICUNFEI'
    //   this.confirmLoading = true
    //   getAction(url, params).then((res) => {
    //     if (res.success) {
    //       if (res.result.length > 0) {
    //         this.duicunfei = res.result[0].price
    //         this.duicunfeiCurrency = res.result[0].currency
    //       } else {
    //         this.duicunfei = 0
    //       }
    //       this.calcOverdueStorageFee()
    //       this.confirmLoading = false
    //       console.log(this.duicunfei)
    //     } else {
    //       this.$message.warning(res.message)
    //     }
    //   })
    //   this.form.setFieldsValue(pick(row, 'overdueStorageFee','intentionToSellBoxFeel','customerBusinessNumber', 'takeBoxTime', 'boxId', 'companyName', 'containerCode', 'containerNumber', 'containerType', 'pol', 'pod', 'polInTime', 'eta', 'etd', 'podReturnboxTime', 'podLeaveTime', 'podYardInfo', 'podYardCostRate', 'buyBoxCost', 'useBoxCost', 'saleBoxCost', 'podYardTotalCost', 'profit', 'status', 'orderStartTime'))
    // }

  }
}
</script>

<style scoped lang="less">
.plclass {
  &::placeholder {
    color: red;
  }
}
</style>